BEGIN;
SELECT first_name FROM lock_test.`actor` FOR UPDATE;
/*执行事务提交，结束X锁*/
COMMIT;


/*--------------------------------------------------------------*/
BEGIN;
SELECT first_name FROM lock_test.`actor` FOR UPDATE NO WAIT;

SELECT first_name FROM lock_test.`actor` FOR UPDATE skip locked;

/*执行事务提交，结束X锁*/
COMMIT;


/*--------------------------------------------------------------*/